package ch.myrss.client.rpc;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public class InitializeRPC {
    
    public final RPCServiceAsync initiailizeServiceEntryPoint() {
        RPCServiceAsync rpcService = (RPCServiceAsync) GWT
                .create(RPCService.class);
        ServiceDefTarget target = (ServiceDefTarget) rpcService;
        String staticResponseURL = GWT.getModuleBaseURL();
        //staticResponseURL += "/rpcService";   // WEB MODE
        staticResponseURL += "/";               // HOSTED MODE
        target.setServiceEntryPoint(staticResponseURL);
        return rpcService;
    }

}
